package com.asia5b.a5mall.middleware.api

import com.asia5b.a5mall.middleware.model.home.CategoryModel
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Path

/**
 * Created by zhangyuncai on 2019/12/21.
 */
interface CategoryApi {


    /**
     * @Note   首页等商品分类数据
     * @param   parentId    分类id，顶级为0
     */
    @GET("goods/categories/{parent_id}/children")
    fun getChildCat(@Path("parent_id") parentId: Int): Observable<ArrayList<CategoryModel>>

    /**
     * @Note   首页等商品分类数据
     * @param   parentId    分类id，顶级为0
     */
    @GET("goods/categories/{parent_id}/children")
    fun getParentCat(@Path("parent_id") parentId: Int = 0): Observable<ArrayList<CategoryModel>>

}